package com.peas.platform.module.icims.contract.basal.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 合同类型
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_contract_type`")
public class ContractTypePo extends BasePo {

    // 合同类型编码
    @Comment(value = "合同类型编码")
    @Size(max = 20, message = "合同类型编码不能超过20个字符")
    @TableField(value = "`code`", jdbcType = JdbcType.VARCHAR)
    private String code;

    // 合同类型名称
    @Comment(value = "合同类型名称")
    @NotBlank(message = "合同类型名称不能为空")
    @Size(max = 200, message = "合同类型名称不能超过200个字符")
    @TableField(value = "`name`", jdbcType = JdbcType.VARCHAR)
    private String name;

    // 所属大类
    @Comment(value = "所属大类")
    @Size(max = 20, message = "所属大类不能超过20个字符")
    @TableField(value = "`catalog`", jdbcType = JdbcType.VARCHAR)
    private String catalog;

    // 是否到期预警
    @Comment(value = "是否到期预警")
    @Size(max = 20, message = "是否到期预警不能超过20个字符")
    @TableField(value = "`is_warning`", jdbcType = JdbcType.VARCHAR)
    private String isWarning;

    // 预警提前天数
    @Comment(value = "预警提前天数")
    @Max(value = 99999, message = "预警提前天数取值无效")
    @TableField(value = "`warning_forward`", jdbcType = JdbcType.INTEGER)
    private Integer warningForward;

    // 状态
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @NotBlank(message = "状态不能为空")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

}
